<template>
  <div class="glass-navbar">
    <div class="navbar-container">
      <!-- Logo -->
      <div class="logo">
        <img src="@/assets/sdse_logo.png" alt="Logo" />
<!--        style="width:100px; height: auto;"-->
      </div>

      <!-- Navigation Links -->
      <div class="nav-group">
        <div class="nav-item active">首页</div>
        <div class="nav-item">关于我们</div>
        <div class="nav-item">常见问题</div>
      </div>

      <!-- Right Buttons -->
      <div class="navbar-right">
        <button class="theme-toggle" aria-label="切换主题">🌓</button>
        <button class="use-button">登录/注册</button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'GlassNavbar'
}
</script>

<style scoped>
.glass-navbar::before {
  content: "";
  position: absolute;
  top: -60px;
  left: -60px;
  right: -60px;
  bottom: -60px;
  backdrop-filter: blur(80px);
  z-index: -1;
  background-color: rgba(255, 255, 255, 0.1); /* 透明背景增强玻璃感 */
}

.glass-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  overflow: hidden;
  background-color: transparent; /* 交由伪元素处理背景 */
}

.navbar-container {
  //max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 15px 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: left;
}

.logo img {
  width: 80px;
  height: auto;
  margin-left: 8px;
  margin-right: 8px;
}

.nav-group {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 0;
  background-color: white;
  border: 1px solid transparent;
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: background-color 0.3s ease;
  min-height: 46px;
}

.nav-item {
  font-weight: 700;
  font-size: 16px;
  padding: 0 21px;
  color: rgba(18, 19, 22, 0.6);
  cursor: pointer;
  position: relative;
  top: 0.05rem;
  transition: color 0.3s ease;
}

.nav-item:hover {
  color: #121316;
}

.nav-item.active {
  color: #121316;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.use-button {
  padding: 8px 16px;
  border-radius: 9999px;
  background-color: black;
  color: white;
  border: 1px solid black;
  cursor: pointer;
  transition: all 0.3s;
}

.use-button:hover {
  background-color: white;
  color: black;
  border: 1px solid black;
}
</style>
